1. Field of the Invention
The present invention relates to a method and an apparatus for reordering frames in Moving Picture Experts Group (MPEG) coder/decoder, and more particularly to reordering frames of successive digital image signals to code and decode image signals.
2. Description of the Prior Art
In general, motion estimation is a technique for compressing data in image processing methods that estimates a motion vector, in which the motions within the pixels of current frame and pixels of previous frame, in successive image signals, are transmitted as a motion vector and difference of data between macro blocks of the previous frame and the current frame.
In motion estimation, frames of input images are divided into Intra-mode pictures (I-pictures), Predictive-coded pictures (P-pictures), and Bidirectionally predicted-coded pictures (B-pictures). The P-pictures perform forward motion estimation and the B-pictures perform forward and backward motion estimation during the coding process.
In standard MPEG 2, image frames are divided into I-pictures, P-pictures, and B-pictures, and the Group of Picture (GOP) is formed from a series of image frames. The I-pictures are frames (or fields), which are coded within the GOP without the motion estimation. The P-pictures are frames that performs only the forward motion estimation by having I-pictures or other P-pictures as its reference. The B-pictures are frames that perform the forward and backward motion estimation by having I-pictures or P-pictures as its reference.
As illustrated in FIG. 1A, GOP is formed from the successive frames of I, B, B, P, B, B, P, B, B, P, B, B, I, . . . located on time-axis (t). As illustrated in FIG. 1B, the P-pictures for the I-pictures perform the forward motion estimation. The B-pictures for the I-pictures perform the forward motion estimation, and at the same time it also performs the backward motion estimation.
The order of input (displayed when decoded) frames called "a display order" and the coded transmitted order called "a transmission order" are unlike to each other, hence the order of frames needs to be reordered when coding and decoding.
In order to reorder image frames, a frame buffer is required to store the B-pictures. The capacity of frame buffer is not determined by the size of GOP but by a distance (M) between the I-pictures and the P-pictures. For example, when two B-pictures are inserted between the I-picture and the P-picture, a memory for 2 frames is required to store them. The B-pictures need to be stored since the I and P-pictures are directly transmitted to be processed in the motion estimation first, and the motion estimation of the B picture is performed subsequently.
The related art for reordering image data is disclosed in U.S. Pat. No. 5,247,355. However, in the prior art, as the apparatus for reordering order of image frames is constrained by the speed of DRAMs, a high capacity memory is required for double buffering due to the low speed of DRAMs conventionally utilized.